import {checkComponent} from "../utils/utils";

export default class DrawState{
    static lineWidth;
    static lineColor;
    static lineClampToGround;
    static lineHeightReference;
    static lineMaterial;

    static init(){
        DrawState.lineColor = Cesium.Color.RED;
        DrawState.lineWidth = 3;
        DrawState.lineMaterial = Cesium.Color.BLACK;
    }

    static getLineMaterial(){
        let color = DrawState.lineColor;
        let material = color;
        switch (DrawState.lineMaterial) {
            case "solid":
                material = color;
                break;
            case "dash":
                material = new Cesium.PolylineDashMaterialProperty({
                    color: color
                });
                break;
            case "glow":
                material = new Cesium.PolylineGlowMaterialProperty({
                    color: color
                });
                break;
            case "arrow":
                material = new Cesium.PolylineArrowMaterialProperty(color);
                break;
        }
        return material;
    }
}